"use strict";
var fnInit;
(function (fnInit) {
    function MakeCount() {
        let obj = ((st) => {
            return '';
        });
        obj.interval = 5;
        obj.reset = () => {
        };
        return obj;
    }
    // 使用
    const c = MakeCount();
    console.log(c(10)); // 调用函数部分
    console.log(c.interval); // 访问属性
    c.reset(); // 调用方法
    function getZks(ZKS) {
        return ZKS.zzzks("1", "2");
    }
    let UseZks = {
        zzzks: function (a, b) {
            console.log(a + b);
        }
    };
    getZks(UseZks);
    // 箭头函数的返回值  简单写法
    const getSum = (a, b) => {
        return a + b;
    };
    console.log(getSum(6, 5));
    // 完整的写法为  ()=>返回值类型
    const getSum2 = (a, b) => {
        return a + b;
    };
    console.log(getSum2("4", 5));
    // 普通函数的返回值
    const getSumI = function (a, b) {
        return a + b; //使用了类型断言
    };
    // 完整的写法为
    const getSumI3 = function (a, b) {
        return a + b; //使用了类型断言
    };
    console.log(getSumI(55, 66));
    let mySearch = function (source, subString) {
        return source.search(subString) !== -1;
    };
    console.log(mySearch("hello world", "world"));
    function noVoid(...args) {
        console.log(args);
    }
    console.log(noVoid(123, 563, 66));
    function greeter(fn) {
        fn("nihao");
    }
    greeter((pla) => {
        console.log(pla);
    });
    const add = (a) => {
        return a + 1;
    };
})(fnInit || (fnInit = {}));
